<template>
	<div class="wrap">
		<div class="essential-box">
			<div class="pay-title">工作经历</div>
			<el-row :gutter="20">
                <div class="cont_work" v-for="(item, index) in work_experience" :key="index">
                    <p class="title">
                        {{ item.start_time }} - {{ item.end_time }}<span>{{ item.enterprise_name }}</span
                        >{{ item.position }}
                    </p>
                    <p>
                        {{ item.job_content }}
                    </p>
                </div>
            </el-row>
			<div class="pay-title mt_20">教育经历</div>
            <el-row :gutter="20">
                <div class="cont_work" v-for="(item, index) in education_experience" :key="index">
                    <p class="title">
                        {{ item.entrance_time }} - {{ item.graduate_time }}<span>{{ item.school }}</span
                        >{{ item.specialty }}
                    </p>
                </div>
            </el-row>
            <div class="pay-title  mt_20">自我评价</div>
			<el-row :gutter="20">
                <div class="cont_work">
                    <p class="title">
                        {{ self_assessment }}
                    </p>
                </div>
            </el-row>
		</div>
	</div>
</template>

<script>
export default {
	name: 'PersonelResume',
	props: {
		userInfo: {
            type: Object,
            required: true
        }
	},
	data() {
		return {
            work_experience: [
                {
                    start_time: '2017-06-01',
                    end_time: '2018-09-01',
                    enterprise_name: '肯德基',
                    position: '前台',
                    job_content: '收银，清扫，后厨'
                }
            ],
            education_experience: [
                {
                    entrance_time: '2018-02-01',
                    graduate_time: '2019-10-30',
                    school: '北京大学',
                    specialty: '汉语学'
                }
            ],
            self_assessment: '顾客接待，收银，封箱，巡回卖场，接O2O，商整'
		}
	},
	async mounted() {
        this.setValue()
    },
    watch: {
        userInfo() {
            this.setValue()
        }
    },
    methods: {
        setValue() {
            this.work_experience = this.userInfo.work_experience
            this.education_experience = this.userInfo.education_experience
            this.self_assessment = this.userInfo.self_assessment
        }
    }
}
</script>

<style scoped lang="scss">
.essential-box {
	margin-bottom: 30px;
}
.pay-title {
	color: #222222;
	font-size: 14px;
	font-weight: bold;
	padding-bottom: 10px;
	border-bottom: 1px solid #ebebeb;
}
.cont_work {
	width: 90%;
	padding: 20px 30px;
}

.cont_work p {
	font-size: 14px;
	color: #888888;
	line-height: 2em;
}

.cont_work span {
	margin: 0 15px;
	color: #000;
}

</style>



// WEBPACK FOOTER //
// src/components/staff/components/PersonelResume.vue